package com.tengju.bff.interfaces.covercharge.constant;
/**
 * 代发服务状态枚举
 *
 * @author cj
 */
public enum FundOutFeignClientStatusEnum {
    FAILED("failed","失败"),
    PROCESS("process","处理中"),
    UN_KNOW("unknow","未知"),
    SUCCESS("success","成功");

    private String code;
    private String desc;

    FundOutFeignClientStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode(){
        return this.code;
    }
    public String getDesc(){
        return this.desc;
    }

    public static FundOutFeignClientStatusEnum getClientStatusDesc (String code){
        for(FundOutFeignClientStatusEnum statusEnum : (FundOutFeignClientStatusEnum.values())){
            if(statusEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return statusEnum;
            }
        }
        return null;
    }
}
